/*
 * @Author: your name
 * @Date: 2019-11-06 09:24:07
 * @LastEditTime: 2020-06-09 15:33:28
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \FCARD一卡通WAPWeb\vue.config.js
 */
const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}
module.exports = {
    
    chainWebpack: config => {
        config.resolve.alias
            .set('@', resolve('./')) // key,value自行定义，比如.set('@@', resolve('src/components'))
    },
    configureWebpack: config => {
        if (process.env.NODE_ENV === 'production') {
            config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true;
            config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log'];
        }
    }
    
}